<div class="ads_content">
    <div id="data_select">
        <table cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr>
                    <th colspan="5" class="search-up"><span class="search-ups2">Все доступные города</span>. Последние предложения о <span class="search-ups2">аренде квартир за неделю</span>. </th>
                </tr>
                <tr>
                    <td class="search-m">
                    <div>
                        Цена
                    </div></td>
                    <td class="search-m">
                    <div>
                        Дата
                    </div> 
                    <div>
                        Комнат
                    </div>
                    <div>
                        Площадь
                    </div></td>
                    <td class="search-m">
                    <div>
                        Телефон
                    </div></td>
                    <td class="search-m">
                    <div>
                        Адрес
                    </div></td>
                    <td class="search-m">
                    <div>
                        Подробнее
                    </div></td>
                </tr>
                <tr>
                    <td colspan="7"><div class="search_border_down"></div></td>
                </tr>
                <?php

foreach ($ads as $key => $value):

                ?>

                <tr style="background: #e5e3e3;">
                    <td class="search-c-d_tabl" rowspan="2">
                    <table cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                            <tr>
                                <td>
                                <div class="search-c-d_numb">
                                    <span>№<?php echo $value -> id; ?></span>
                                </div></td>
                            </tr>

                            <?php if($value -> posutochno == 1){
                            ?>
                            <tr>
                                <td>
                                <div class="sutki">
                                    Посуточно
                                </div></td>
                            </tr>
                            <?php } ?>

                            <tr>
                                <td>
                                <div class="search-c-d_summ">
                                    <span><?php echo $value -> summa; ?>р</span>
                                </div></td>
                            </tr>
                            <tr>
                                <td>
                                <div class="ads_url foto_box">
                                    <a href="/a_589.html" target="_blank"> <img alt="" src="http://yroom.ru/images/advert/80/13385440700471.jpg"></a>
                                </div></td>
                            </tr>
                        </tbody>
                    </table></td colspan="2">
                    <td class="search-c-u">
                    <div>
                        <a href="/arenda_za_<?php echo date('d_m_Y', $value -> date); ?>"><?php echo date('d.m.Y', $value -> date); ?></a>
                    </div>
                    <div>
                    	
                    	<?php include 'room.php';?>
                    	
                    </div>
                    <div>

                        <?php
	if ($value -> square_area != '') {  echo $value -> square_area;
	} else {
		echo '--';
	}
                        ?>/<?php
	if ($value -> square_room != '') {  echo $value -> square_room;
	} else {
		echo '--';
	}
                        ?>/<?php
	if ($value -> square_kitchen != '') {  echo $value -> square_kitchen;
	} else {
		echo '--';
	}
                        ?>

                        м <sup>2</sup>

                    </div></td>

                    <td class="search-c-u"><?php if($value -> spam_tel >0 ){
                    ?>

                    <div class="telef_ads">
                        <a href="#" onclick="second_telefon('<?php echo $value -> telefon; ?>');" title="warning"> <?php echo $value -> telefon; ?></a>
                    </div>
                    <div class="people_ads">
                        <a onclick="second_telefon('<?php echo $value -> telefon; ?>');" title="warning"><?php echo $value -> people; ?></a>
                    </div><?php }else{ ?>
                    <div class="telef_ads">
                        <?php echo $value -> telefon; ?>
                    </div>
                    <div class="people_ads">
                        <?php echo $value -> people; ?>
                    </div><?} ?></td>
                    <td class="search-c-u">
                    <div class="search-enter-city">
                        <?php echo $value -> name; ?>,<?php echo $value -> name_area; ?>,

                    </div></td>
                    <td class="search-c-d" rowspan="2">
                    <div class="marp">
                        <a onclick="hrefurl('/a_'<?php echo $value -> id; ?>'.html');" tabindex="5891">Подробнее</a>
                    </div>
                    <div class="marp">
                        <a onclick="comm_a('<?php echo $value -> id; ?>');" tabindex="5892">Коментировать</a>
                    </div>
                    <div class="marp">
                        <a onclick="spam_a('<?php echo $value -> id; ?>');" tabindex="5893">Жалоба (<span id="spam'<?php echo $value -> id; ?>'">0</span>)</a>
                    </div>
                    <div class="marp">
                        <a onclick="realtor('<?php echo $value -> id; ?>');" tabindex="5894">Риелтор (<span id="real'<?php echo $value -> id; ?>'">0</span>)</a>
                    </div></td>
                </tr>
                <tr style="background: #e5e3e3;">
                    <td class="search-c-t" colspan="4">
                    <div>
                        <?php echo $value -> info; ?>
                    </div></td>
                    <td class="search-c-adress">
                    <div>
                        <?php echo $value -> adress; ?>
                    </div></td>
                </tr>
                <tr>
                    <td colspan="7"><div class="search_border_down"></div></td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div>